## -*- coding: utf-8 -*-
<%inherit file="/base/blog_base.html"/>
<%namespace file="/derived/blog/blog.html" import="blog_show" />
<%namespace file="/component/utils.html" import="paginate" />
<%!
    from pythonblog.service import content_service
%>
% if len(c.posts) :
    % for element in c.posts:
    <% post = content_service.get_post(element.id) %>
    <div class="blog_main">
        ${blog_show(post)}
    </div>
    % endfor
    
    % if c.posts.last_page > 1:
    ${paginate(c.posts, request.environ.get('PATH_INFO'))}
    % endif
% endif
